package cn.njutp.Queue;

import cn.njutp.list.ArrayList;
import cn.njutp.list.List;

public class Queue<E> {

    private List<E> list=new ArrayList<>();

    public void clear(){
        list.clear();
    }

    public boolean isEmpty(){
        return list.isEmpty();
    }

    public void enQueue(E element){
        list.add(element);
    }

    public E deQueue(){
        E ans=list.get(0);
        list.remove(0);
        return ans;
    }

    public E front(){
        return list.get(0);
    }


    public int size(){
        return list.size();
    }




}
